import QtQuick 2.5
import QtGraphicalEffects 1.0

Item {
    property var bntText;

    width: 160
    height: 50

    signal bntClicked()
//    scale: ma.containsMouse?1.1:1
//    Behavior on scale{
//        PropertyAnimation{
//            properties: "scale"
//            duration: 200
//            easing.type: Easing.OutBack
//        }
//    }

//    Glow{
//        anchors.fill: bg
//        source : bg
//        color:"#33000000"
//        spread: 0.4
//        fast: true
//        cached: true
//        transparentBorder: true
//        samples: 15
//        radius: 10
//    }

    Rectangle{
        id:bg
        anchors.fill: parent
        radius: height/2
        color:ma.containsMouse?"#ffffff":"#efefef"
        border.width: 1
        border.color: "#999999"
        Text{
            anchors.centerIn: parent
            text:bntText
            font.pointSize: 19
            color:"#666666"
            antialiasing: true
            font.bold: true

        }
    }
    MouseArea{
        id:ma
        anchors.fill: parent
        hoverEnabled: true
        onClicked: bntClicked()
    }
}
